package summary;

/**
 * @Author: 海琳琦
 * @Date: 2022/3/7 10:25
 * https://leetcode-cn.com/problems/move-zeroes/
 */
public class Title283 {

    public static void moveZeroes1(int[] nums) {
        int left = 0;
        for (int right = 0; right < nums.length; right++) {
            if (nums[right] != 0) {
                int temp = nums[right];
                nums[right] = nums[left];
                nums[left] = temp;
                left++;
            }
        }
    }








    public static void main(String[] args) {
        int[] reuslt = {1, 0, 1};
        moveZeroes1(reuslt);
    }
}
